<template>
    <div>
        <el-form ref="form" :model="form" label-width="80px">
            <el-form-item label="名称">
                <el-input v-model="form.name"></el-input>
            </el-form-item>
            <el-form-item label="最大人数">
                <el-input v-model="form.maxNumber"></el-input>
            </el-form-item>
            <el-form-item label="用途">
                <el-input v-model="form.purpose"></el-input>
            </el-form-item>
            <!-- 富文本编辑器 -->
            <el-form-item label="描述">
                <wangeditor :editorHtml="form.description" @getEditorCon="getEditorForm"></wangeditor>
            </el-form-item>
            <el-form-item label="是否开启">
                <el-select v-model="form.isOpen" placeholder="请选择">
                    <el-option
                      v-for="(item, index) in options"
                      :key="index"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                </el-select>
            </el-form-item>
        </el-form>
    </div>
</template>
<script>
import wangeditor from '@/components/wangEditor/index.vue'
export default {
  props: {
    form: Object
  },
  components: {
    wangeditor
  },
  data() {
    return {
      options: [{
        value: 0,
        label: '暂未开放'
      }, {
        value: 1,
        label: '开放预约'
      }]
    }
  },
  methods: {
    getEditorForm(data) {
      this.$emit('getEditorData', data)
    }
  }
}
</script>
